import math
a=input('列表:').split(" ")
a1=[int(a[i]) for i in range(len(a))]
print(a1)
print("0、退出")
print("1、清空")
print("2、增加")
print("3、删除")
print("4、插入")
print("5、浏览")
print("6、复制")
print("7、反转")
print("8、排正序")
print("9、排倒序")
print("10、求和")
print("11、求序列长度")
print("12、最小值")
print("13、最大值")
choose=1
def case0():
    input("退出")
    while(choose==0):
        choose=-1
        break
def case1():
    a1.clear() 
    print("列表已清空")
def case2():
    i=int(input("数据:"))
    a1.append(i)
    print(a1)
def case3():
    i=int(input("下标:"))
    a1.pop(i)
    print(a1)
def case4():
    i=int(input("下标:"))
    j=int(input("数据:"))
    a1.insert(i,j)
    print(a1)
def case4():
    i=int(input("下标："))
    j=int(input("数据："))
    a[i]=j
    print(a1)
def case5():
    i=int(input("下标："))
    print(a[i])
def case6():
    a2=a1.copy()
    print(a2)
def case7():
    a1.reverse()
    print(a1)
def case8():
    a1.sort(reverse=False)
    print(a1)
def case9():
    a1.sort(reverse=True)
    print(a1)
def case10():
    t=sum(a1)
    print(t)
def case11():
    t=len(a1)
    print(t)
def case12():
    t=min(a1)
    print(t)
def case13():
    t=max(a1)
    print(t)
while(choose>=0):
    choose=int(input("请选择："))
    if(choose==0):
        case0()
    elif(choose==1):
        case1()
    elif(choose==2):
        case2()
    elif(choose==3):
        case3()
    elif(choose==4):
        case4()
    elif(choose==5):
        case5()
    elif(choose==6):
        case6()
    elif(choose==7):
        case7()
    elif(choose==8):
        case8()
    elif(choose==9):
        case9()
    elif(choose==10):
        case10()
    elif(choose==11):
        case11()
    elif(choose==12):
        case12()
    elif(choose==13):
        case13()